<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>理事会名单</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <meta http-equiv="X-UA-Compatible" content="IE=10"/>
    <!------css样式------>
    <link rel="stylesheet" href="css/common.css">
    <link rel="stylesheet" href="css/regulations.css">
</head>
<body>
<!------IE浏览器判断------>
<!--[if lt IE 9]>
<script type="text/javascript" src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<![endif]-->
<jsp:include page="head.jsp"></jsp:include>
<!------主内容区------>
<div class="main">
    <div class="poistion">
        <h4 class="clearfix">
            <span class="icon icon1"></span><span> 首页>会员专区 </span>
        </h4>
    </div>
    <div id="aside">
        <div class="aside-title">
            <h3>会员专区</h3>
        </div>
        <div class="aside-content">
            <ul class="itemlist">
                <li class="item hover"><a class="item-link">理事会名单<span class="icon2"></span></a>
                    <ul>
                        <li ><a href="company_findByLevel?currPage=1&level=1">会长副会长名单<i></i></a></li>
                        <li ><a href="company_findByLevel?currPage=1&level=2">常务理事名单<i></i></a></li>
                        <li ><a href="company_findByLevel?currPage=1&level=3">理事单位<i></i></a></li>
                        <li ><a href="company_findByLevel?currPage=1&level=4">会员单位<i></i></a></li>
                    </ul>
                </li>
                <li class="item"><a class="item-link" href="news_findVipNews">会员风采<span class="icon2"></span></a></li>
            </ul>
        </div>
    </div>
    
    <c:if test="${pb.beanlist.size()!=0 }">
    	<c:set var="cid" value="${pb.beanlist.get(0).comp_level }"></c:set>
    </c:if>
    
    <!-- 开始左边 -->
<c:choose>
	<c:when test="${cid==null }">
		<div id="newsList" class="modal">
		    <div class="newsList-title">
		        <h3>会员风采</h3>
		        <i></i>
		    </div>
		    <div class="newsList-content">
	        <ul>
        	<c:forEach items="${npb.beanlist }" var="n">
	        		<li><span class="icon2"></span><a href="news_findById?news_id=${n.news_id }" target="_blank">${n.news_title }</a></li>
	        	</c:forEach>
	        </ul>
	    </div>
	    <div class="pagenations">
	        <ul class="clearfix">
	            <li><a href="news_findVipNews" disabled="disabled"> 首页</a></li>
	            <c:choose>
		            <c:when test="${npb.currPage-1>0 }">
		            	 <li><a href="news_findVipNews?currPage=${npb.currPage-1 }" disabled="disabled"> 上一页</a></li>
		            </c:when>
		            <c:otherwise>
		            	<li><a href="#"> 上一页</a></li>
		            </c:otherwise>
	            </c:choose>
	            <c:choose>
	            	<c:when test="${npb.currPage+1<=npb.totalPage }">
            		<li><a href="news_findVipNews?currPage=${npb.currPage+1 }"> 下一页</a></li>
            	</c:when>
            	<c:otherwise>
            		<li><a href="#"> 下一页</a></li>
            	</c:otherwise>
            </c:choose>
            <li><a href="news_findVipNews?currPage=${npb.totalPage }">尾页</a></li>
            <li>第
                <select id="pageId" onchange="changeVipNews()">
		           <c:forEach begin="1" end="${npb.totalPage }" var="n">
		                <c:choose>
		                	<c:when test="${npb.currPage==n }">
		                		<option value="${n }" selected="selected">${n }</option>
		                	</c:when>
		                	<c:otherwise>
		                		<option value="${n }">${n }</option>
		                	</c:otherwise>
		                </c:choose>
		            </c:forEach>
                </select>
                页
            </li>
            <li>共
                <span>${npb.totalCount }</span>
                条记录
            </li>
            <li><span>${npb.currPage }/${npb.totalPage }</span> 页</li>
        </ul>
    </div>
</div>
	</c:when>
	<c:otherwise>
		<div id="newsList" class="modal">
    <div class="newsList-title">
        <h3>会员相关</h3>
        <i></i>
    </div>
    <div class="newsList-content">
        <ul>
        	<c:forEach items="${pb.beanlist }" var="c">
        		<li><span class="icon2"></span><a href="company_findById?company.comp_id=${c.comp_id }" >${c.comp_name }</a></li>
        	</c:forEach>
        </ul>
    </div>
    <div class="pagenations">
        <ul class="clearfix">
            <li><a href="company_findByLevel?currPage=1&level=${cid}" disabled="disabled"> 首页</a></li>
            <c:choose>
	            <c:when test="${pb.currPage-1>0 }">
	            	 <li><a href="company_findByLevel?currPage=${pb.currPage-1 }&level=${cid}" disabled="disabled"> 上一页</a></li>
	            </c:when>
	            <c:otherwise>
	            	<li><a href="#"> 上一页</a></li>
	            </c:otherwise>
            </c:choose>
            <c:choose>
            	<c:when test="${pb.currPage+1<=pb.totalPage }">
            		<li><a href="company_findByLevel?currPage=${pb.currPage+1 }&level=${cid}"> 下一页</a></li>
            	</c:when>
            	<c:otherwise>
            		<li><a href="#"> 下一页</a></li>
            	</c:otherwise>
            </c:choose>
            <li><a href="company_findByLevel?currPage=${pb.totalPage }&level=${cid }">尾页</a></li>
            <li>第
                <select id="pageId" onchange="changePage()">
		           <c:forEach begin="1" end="${pb.totalPage }" var="n">
		                <c:choose>
		                	<c:when test="${pb.currPage==n }">
		                		<option value="${n }" selected="selected">${n }</option>
		                	</c:when>
		                	<c:otherwise>
		                		<option value="${n }">${n }</option>
		                	</c:otherwise>
		                </c:choose>
		            </c:forEach>
                </select>
                页
            </li>
            <li>共
                <span>${pb.totalCount }</span>
                条记录
            </li>
            <li><span>${pb.currPage }/${pb.totalPage }</span> 页</li>
        </ul>
    </div>
</div>
	</c:otherwise>
</c:choose>
    
    
    <!-- <div id="newsLis1" class="modal">
       <iframe>
			
       </iframe>
    </div> -->
</div>
<!--页脚-->
<jsp:include page="/foot.jsp"></jsp:include>
<!------JS部分------>
<script src="js/regulations.js"></script>
<script type="text/javascript">
	function changePage(){
		//选中页
		var n =  $("#pageId").val();
		//类别
		var a = ${cid};
		window.location.href="company_findByLevel?currPage="+n+"&level="+a;
	}
	
</script>
<script type="text/javascript">
	function changeVipNews(){
		var n = $("#pageId").val();
		window.location.href="news_findVipNews?currPage="+n;
	}
</script>
</body>
</html>
